<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

Route::get('/', function () {
    return view('welcome');
});

//=======================================商品列表========================================================
//添加页面显示
Route::get('/goods/add','Admin\GoodsController@add');
//商品添加操作
Route::post('/goods/insert','Admin\GoodsController@insert');
//显示商品列表
Route::get('/goods/index','Admin\GoodsController@index');

//修改商品回填数据
Route::get('/goods/update/{gid}/{cid}','Admin\GoodsController@update');

//修改完商品
Route::post('/goods/updateInfo','Admin\GoodsController@updateInfo');

//删除商品操作
Route::get('/goods/delete/{gid}','Admin\GoodsController@delete');

//查询商品
Route::post('/goods/select','Admin\GoodsController@select');

//====================================商品参数操作=======================================================
//商品参数列表
Route::get('/goods/parameters','Admin\ParametersController@index');

//商品参数模板
Route::get('/goods/addPar/{gid}','Admin\ParametersController@addPar');

//商品参数添加
Route::post('goods/insertPar','Admin\ParametersController@insertPar');

//商品参数删除
Route::get('goods/deletePar/{id}','Admin\ParametersController@deletePar');

//商品参数回填
Route::get('goods/updatePar/{id}','Admin\ParametersController@updatePar');

//商品参数修改
Route::post('/goods/updateParing','Admin\ParametersController@updateparing');


//========================================网站配置=======================================================

//网站配置
Route::get('/config/adminConfig','Admin\ConfigController@index');

//添加网站配置模板
Route::get('/config/addConf','Admin\ConfigController@addConf');

//添加网站配置
Route::post('/config/insertConf','Admin\ConfigController@insertConf');

//修改网站配置模板
Route::get('/config/updateConf/{id}','Admin\ConfigController@updateConf');

//修改网站配置操作
Route::post('/config/updateConfig','Admin\ConfigController@updateConfig');

//=======================================友情链接========================================================

//友情链接列表显示
Route::get('/link/adminLink','Admin\LinkController@link');

//友情链接添加
Route::get('/link/addLink','Admin\LinkController@addLink');

//友情链接添加操作
Route::post('/link/insertLink','Admin\LinkController@insertLink');

//友情链接修改模板
Route::get('/link/updateLink/{lid}','Admin\LinkController@updateLink');

//友情链接修改操作
Route::post('/link/aupdateLink','Admin\LinkController@aupdateLink');

//友情链接删除操作
Route::get('/link/deleteLink/{lid}','Admin\LinkController@deleteLink');

//=====================================订单============================================================

//显示订单模板
Route::get('/order/adminOrder','Admin\OrderController@adminOrder');

//修改订单状态
Route::get('/order/aupdate/{id}/{oststus}','Admin\OrderController@aupdateOrder');

//删除订单
Route::get('/order/deleteOrder/{id}','Admin\OrderController@delelteOrder');

//修改订单模板
Route::get('/order/updateOrder/{id}','Admin\OrderController@updateOrder');

//修改操作
Route::post('/order/updateOrdera','Admin\OrderController@updateOrdera');


//====================================购物车===========================================================

//显示购物车列表模板
Route::get('/shop/index','Admin\ShopController@shopIndex');

//修改购物车模板
Route::get('/shop/shopUpdate/{sid}','Admin\ShopController@shopUpdate');

//修改购物车操作
Route::post('/shop/shopUpdatea','Admin\ShopController@shopUpdatea');

//删除购物车中商品
Route::get('/shop/deleteShop/{sid}','Admin\ShopController@shopDelete');


//===================================网站前台首页分类==================================================

//显示分类列表模板
Route::get('/cates/adminCates','Admin\CatesController@cateIndex');

//添加分类模板
Route::get('/cates/catesAdda','Admin\CatesController@cateAdda');


//===================================前台 修改头像=====================================================
//显示模板
Route::get('/userTx','Home\UserTxController@update');
Route::post('/upload','Home\UserTxController@upload');

//==================================前台地址管理===========================================================

//显示模板地址管理
Route::get('/addressGl','Home\UserTxController@addAdress');

//添加地址管理操作
Route::post('/addressGl/add','Home\UserTxController@address');

//删除地址管理操作
Route::get('/deleteAddress/{id}','Home\UserTxController@deleteAddress');

//修改地址管理操作
Route::get('/updateAddress/{id}','Home\UserTxController@updateAddress');

//设置默认收获地址
Route::get('/setAddress/{id}/{status}','Home\UserTxController@setAddress');